<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景</title>
    <style>
        .c1{
            width: 100px;
            height: 100px;
            background-color: red;
        }
        .c2{
            width: 300px;
            height: 200px;
            background-color: green;
            background-image: url("../images/heihei.gif");
            background-repeat: no-repeat;
            background-position: 10% 10%;
        }
        .c3{
            width: 1800px;
            height: 1300px;
            background-image: url("../images/4.jpg");
            background-attachment: fixed;
        }
        .c4{
            width: 1500px;
            height: 1500px;
            background: no-repeat url("../images/heihei.gif")  left top red fixed;
        }
    </style>
</head>
<body>
<div class="c1"></div>
<div class="c2"></div>
<div class="c3"></div>
<div class="c4"></div>
</body>
</html>